--system for movement of objects.
local priority = 3;

EntitySystem.updatesystem("movement", priority, function(dt) 
    for e in pairs(EntitySystem.query("moveable")) do
      e.position.x = e.position.x + (e.motion.dir.x * e.motion.velocity)
      e.position.y = e.position.y + (e.motion.dir.y * e.motion.velocity) 
    end
end)